package com.netcracker.training.automonic.dao.entities;

import java.util.List;

/**
 * One of analyzed objects on the site.
 * 
 * <p>Objects have attributes and statistics.
 * <br>Attributes describe properties of objects that no change or change rarely.
 * <br>Statistics describe properties of objects that change often.
 * 
 * @author Vadim Gidulyan
 * 
 * @see Site
 * @see Attribute
 * @see Statistics
 */

public interface Object
{

	/**
	 * Returns object id.
	 * 
	 * @return object id
	 */
	int getId();
	
	/**
	 * Returns site from which the object was taken.
	 * 
	 * @return site from which the object was taken
	 */
	Site getSite();
	
	/**
	 * Returns name of object. Generally name is one of attributes of the object.
	 * 
	 * @return name of object
	 */
	String getName();
	
	/**
	 * Sets the name of the object. Generally name is one of attributes of the 
	 * object.
	 * 
	 * @param name new name of the object
	 */
	void setName(String name);
	
	/**
	 * Returns list of object's attributes.
	 * 
	 * @return list of object's attributes
	 */
	List<Attribute> getAttributes();
	
	/**
	 * Returns list of object's attributes.
	 * 
	 * @return list of object's attributes
	 */
	List<Statistics> getStatistics();
	
	/**
	 * Saves object to database.
	 */
	void save();

}
